from time import sleep
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
# 1.打开浏览器
from selenium.webdriver.common.keys import Keys

# 指定 Edge WebDriver 路径（根据你下载的路径修改）
webdriver_path = "H:\chromedriver64\msedgedriver.exe"

# 启动 Edge 浏览器
driver = webdriver.Edge(executable_path=webdriver_path)
# 放大浏览器页面
driver.maximize_window()

# 设置隐式等待
driver.implicitly_wait(10)
# 2.输入访问地址（URL）
driver.get("http://121.43.169.97:8848/pageA.html")

# 定位用户名输入框，就输入admin
driver.find_element_by_css_selector("#user").send_keys("admin")

sleep(3)
driver.quit()